namespace EyeOpen.Warehouse.Data
{
	using System.Data.Entity;

	using Domain;

	public class EntityFrameworkWarehouseContext : DbContext, IWarehouseContext
	{
		public IRepository<Customer> CustomerRepository
		{
			get
			{
				return new Repository<Customer>(Set<Customer>());
			}
		}

		public void Commit()
		{
			this.SaveChanges();
		}

		protected override void OnModelCreating(DbModelBuilder modelBuilder)
		{
			modelBuilder.Entity<Customer>();
		}
	}
}